xen/arm: vgic: Introduce a function to initialize pending_irq
authorJulien Grall <julien.grall@linaro.org>
Wed, 1 Apr 2015 16:21:37 +0000 (17:21 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 2 Apr 2015 09:42:34 +0000 (10:42 +0100)
commitcc95df69713eb2e5a33d5825d89832f3c8c705d8
treed2c0e718a06fa4bec5435c1842ead117cb1f97f8
parentc854618e5612517b50e82c893f737511f4bb180f
xen/arm: vgic: Introduce a function to initialize pending_irq

The structure pending_irq is initialized in the same way in 2 different
places. Introduce vgic_init_pending_irq to avoid code duplication.

Also move the setting of the irq field into this function as we need to
initialize it once rather than every time an IRQ is injected to the guest.

Finally, use unsigned int for the "irq" field to be consistent with the
virq variable

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/gic.c
xen/arch/arm/vgic.c
xen/include/asm-arm/vgic.h